package com.wlsk.license.dto;

import cn.idev.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.wlsk.license.dto.response.GetCarInfoReturnDto;
import com.zhongjinfeng.util.helper.JsonHelper;
import lombok.Data;

@Data
public class TestVo {

    @JsonProperty("entry_id")
    @ExcelProperty(value = "列1",index = 1)
    private Long entryId;

    @ExcelProperty(value = "列2",index = 2)
    private Long merchantId;

    public static void main(String[] args) throws JsonProcessingException {
        String str = "{\"entry_id\":123456,\"merchantId\":654321}";
        TestVo test = new ObjectMapper().readValue(str, TestVo.class);
        test.setEntryId(123456L);
        test.setMerchantId(654321L);
        System.out.println(new ObjectMapper().writeValueAsString(test));


        String sss="{\"vehicleQueryList\":[{\"appid\":0,\"bizlicemanresult\":\"\",\"cClId\":\"\",\"cccnf\":{\"date\":23,\"day\":2,\"hours\":0,\"minutes\":0,\"month\":5,\"seconds\":0,\"time\":1592841600000,\"timezoneOffset\":-480,\"year\":120},\"ccjh\":\"LXPA2B010LD000003\",\"ccp\":\"东风牌EQ6768PB5\",\"color\":\"00180002\",\"colorName\":\"\",\"crllx\":\"00190002\",\"crllxName\":\"\",\"cyxzzrq\":{\"date\":18,\"day\":3,\"hours\":0,\"minutes\":0,\"month\":3,\"seconds\":0,\"time\":1871136000000,\"timezoneOffset\":-480,\"year\":129},\"djjbnx\":{\"date\":20,\"day\":6,\"hours\":0,\"minutes\":0,\"month\":5,\"seconds\":0,\"time\":1781884800000,\"timezoneOffset\":-480,\"year\":126},\"filepath\":\"\",\"genre\":\"00170001\",\"genreName\":\"\",\"indexno\":\"\",\"isProcess\":\"\",\"isgps\":\"\",\"issecuritycheck\":\"\",\"jsjbnx\":{\"date\":17,\"day\":3,\"hours\":0,\"minutes\":0,\"month\":11,\"seconds\":0,\"time\":1765900800000,\"timezoneOffset\":-480,\"year\":125},\"licPlaTypeinfo\":\"\",\"licenseno_yh\":\"\",\"licenseplate\":\"渝A80G77\",\"limitEnd\":null,\"limitStart\":null,\"limitcheck\":{\"date\":18,\"day\":3,\"hours\":0,\"minutes\":0,\"month\":3,\"seconds\":0,\"time\":1871136000000,\"timezoneOffset\":-480,\"year\":129},\"limitend_xl\":null,\"limitplay\":{\"date\":27,\"day\":3,\"hours\":10,\"minutes\":35,\"month\":7,\"seconds\":10,\"time\":1756262110337,\"timezoneOffset\":-480,\"year\":125},\"limitstart_xl\":null,\"lineid\":0,\"maintain\":null,\"manUnitCode\":\"500102\",\"manUnitCodeName\":\"重庆市涪陵区交通运输委员会\",\"mark\":\"\",\"remarks\":\"\",\"seat\":30,\"secupers\":\"\",\"technicalgrade\":\"00150001\",\"technicalgradeName\":\"\",\"totalmileage_xl\":0,\"transportation\":\"500102035546\",\"trip\":\"\",\"typeclasses\":\"00250009\",\"typeclassesName\":\"\",\"vehicleCanRelationBaoCheIndex\":true,\"vehicleid\":0,\"vehicleproducts\":\"县内班车客运,县内包车\"}],\"cccnf\":\"2020-06-23 00:00:00\",\"cyxzzrq\":\"2029-04-18 00:00:00\",\"djjbnx\":\"2026-06-20 00:00:00\",\"jsjbnx\":\"2025-12-17 00:00:00\",\"limitcheck\":\"2029-04-18 00:00:00\",\"limitplay\":\"2025-08-27 10:35:10\"}";
        GetCarInfoReturnDto deserialize = JsonHelper.deserialize(sss, GetCarInfoReturnDto.class);
        System.out.println();
    }
}
